<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta name="author" content="Petar">

	<title>CURL tester</title>
	<script language="javascript" type="text/javascript" src="scripts/prototype.js"></script>
	<script language="javascript" type="text/javascript">
	//<!--
		function ajaxPost(){
			var url = 'curl.php';
			new Ajax.Request(url, {
		  	parameters: $('req_form').serialize(true),
				onSuccess: function(transport){
					$('response').innerHTML = transport.responseText
				}
		  });
		  return false;
		}
	//-->
	</script>
</head>

<body>
<h1>Request</h1>
<form method="post" name="req_form" id="req_form">
<input type="text" name="url" id="url" size="60" />
<select name="method" id="method">
	<option value="GET">GET</option>
	<option value="POST">POST</option>
	<option value="PUT">PUT</option>
	<option value="DELETE">DELETE</option>
</select>
<br />
<textarea id="content" name="content" rows="5" cols="60"></textarea>
<input type="button" name="send" id="send" value="SEND" onclick="ajaxPost();" />
</form>
<h1>Response</h1>
<div id="response" style="width:100%; height: 300px; overflow: auto"></div>
</body>
</html>